<template>
  <div class="box2">
    <h3>潘伊杨的About组件</h3>
    <router-link to="/about/tab1">tab1</router-link>
    <router-link to="/about/tab2">Tab2</router-link>
    <hr/>
    <router-view></router-view>
  </div>
</template>

<script setup>
import { watch } from "vue";
import{ useRoute } from"vue-router"
const router = useRoute()
watch(
  ()=>router.path,
  (path)=>{
  console.log("路由路径是：",path);
})
</script>

<style>
.box2 {
    min-height: 300px;
    background-color: rgb(0, 255, 234);
    padding: 20px;
}
.box2 a{
  margin-left: 15px
}

</style>
